package constant

import (
	"github.com/lab-online/pkg/gen"
	"github.com/lab-online/pkg/resp"
)

const (
	baseSuccessCode         = resp.CodeSuccess + domainCode
	CodeRemoveCourseSuccess = baseSuccessCode + 0
	CodeUpdateCourseSuccess = baseSuccessCode + 1
	CodeSearchCourseSuccess = baseSuccessCode + 2
	CodeGetCoursesSuccess   = baseSuccessCode + 3
	CodeGetCourseSuccess    = baseSuccessCode + 4

	CodeRemoveExperimentSuccess = baseSuccessCode + 4
	CodeUpdateExperimentSuccess = baseSuccessCode + 5
	CodeSearchExperimentSuccess = baseSuccessCode + 6
	CodeGetExperimentsSuccess   = baseSuccessCode + 7
)

func SuccessCodeMap() gen.CodeMap {
	return gen.CodeMap{
		"RemoveCourse": {
			CodeRemoveCourseSuccess: "课程删除成功",
		},
		"UpdateCourse": {
			CodeUpdateCourseSuccess: "课程更新成功",
		},
		"SearchCourse": {
			CodeSearchCourseSuccess: "课程查询成功",
		},
		"GetCourses": {
			CodeGetCoursesSuccess: "课程列表获取成功",
		},
		"GetCourse": {
			CodeGetCourseSuccess: "课程详情获取成功",
		},

		"RemoveExperiment": {
			CodeRemoveExperimentSuccess: "实验删除成功",
		},
		"UpdateExperiment": {
			CodeUpdateExperimentSuccess: "实验更新成功",
		},
		"SearchExperiment": {
			CodeSearchExperimentSuccess: "实验查询成功",
		},
		"GetExperiments": {
			CodeGetExperimentsSuccess: "实验列表获取成功",
		},
	}
}
